<?php
require_once "db.php";
session_start();

$movie = db_escape($_POST['movieid']);
$comment = db_escape($_POST['commentcont']);
$current_time = date('Y-m-d H:i:s');
$account = $_SESSION['uid'];
$write_comment_query_text = "INSERT INTO comments (comment_content, comment_date, accounts_idaccounts, movies_idmovies) VALUES ('$comment', '$current_time', '$account', '$movie')";
$write_comment_query = db_query($write_comment_query_text);
echo 'Your comment was saved. Thank you!';


